
<h2><?= _l('message_title') ?></h2>

<form name="record" action="" method="post">
	<table width="100%" cellspacing="0" cellpadding="4">
		<tr>
			<td align="right" width="10%" valign="top"><?= _l('message_to') ?>:</td>
			<td style="padding-left:8px">
			<select name="user">
				<?php foreach ($friends as $friend): ?>
					<option value="<?=$friend['id']?>"
						<?php 
							if ($_GET['to'] == $friend['id'])
									echo 'selected';
						?>					
					><?=$friend['name']?></option>		
				<?php endforeach; ?>		
				</select><br />
				<span class="help"><?= _l('message_helper') ?></span>
			</td>
		</tr>
		<tr>
			<td align="right"><?= _l('message_subject') ?>:</td>
				<td style="padding-left:8px">
					<input type="text" class="form" style="width:50%" maxlength="50" name="header" value="<?=$subject?>" />
				</td>
		</tr>
		<tr>
			<td colspan="2"><p />
				<textarea name="body" style="width:100%" class="form" rows="10"><?=$_POST['body']?></textarea>
			</td>
		</tr>
		<tr>
			<td colspan="2">
				<input type="submit" value="Отправить" name="submit" class="button" style="width:200px">
			</td>
		</tr>
	</table>
</form>

<div class="simple_div"><?= anchor('user/messages/', '&larr; '._l('message_back_inbox')) ?></div>

